#ifndef MATRIX4X4
#define MATRIX4X4

#include "Vec4.h"
//#include "Quaternion.h"

//--------Mat4x4-------
class Matrix4x4 : public D3DXMATRIX
{
public:

	Matrix4x4() : D3DXMATRIX(g_Identity) { }
	Matrix4x4(D3DXMATRIX &m);

	// Modifiers
	void SetPosition(Vec3 const &pos);
	void SetPosition(Vec4 const &pos);

	// Accessors and Calculation Methods
	Vec3 GetPosition() const;
	Vec4 Xform(Vec4 &v) const;
	Vec3 Xform(Vec3 &v) const;
	Matrix4x4 Inverse() const;

	static Matrix4x4 g_Identity;

	// Initialization methods
	void BuildTranslation(const Vec3 &pos);
	void BuildTranslation(const float x, const float y, const float z );
	inline void BuildRotationX(const float radians) { D3DXMatrixRotationX(this, radians); }
	inline void BuildRotationY(const float radians) { D3DXMatrixRotationY(this, radians); }
	inline void BuildRotationZ(const float radians) { D3DXMatrixRotationZ(this, radians); }
	inline void BuildYawPitchRoll(const float yawRadians, const float pitchRadians, const float rollRadians)
		{ D3DXMatrixRotationYawPitchRoll(this, yawRadians, pitchRadians, rollRadians); }
	//inline void BuildRotationQuat(const Quaternion &q) { D3DXMatrixRotationQuaternion(this, &q); }
};

#endif